import { createRouter, createWebHistory } from 'vue-router'

// 页面组件（保持与原有一致；如需按需加载可改为动态导入）
import Home from '../views/Home.vue'
import AnnouncementsPage from '../views/AnnouncementsPage.vue'
import AnnouncementDetailPage from '../views/AnnouncementDetailPage.vue'
import BanListPage from '../views/BanListPage.vue'
import CommandsPage from '../views/CommandsPage.vue'
import DonationPage from '../views/DonationPage.vue'
import DonorThanksPage from '../views/DonorThanksPage.vue'
import LoginPage from '../views/LoginPage.vue'
import RegisterPage from '../views/RegisterPage.vue'
import ProfilePage from '../views/ProfilePage.vue'


export const routes = [
  { path: '/', component: Home },
  { path: '/announcements', component: AnnouncementsPage },
  { path: '/announcements/:id', component: AnnouncementDetailPage },
  { path: '/banlist', component: BanListPage },
  { path: '/commands', component: CommandsPage },
  { path: '/donation', component: DonationPage },
  { path: '/donor-thanks', component: DonorThanksPage },
  { path: '/login', component: LoginPage },
  { path: '/register', component: RegisterPage },
  { path: '/profile', component: ProfilePage },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router


